package com.feidian.helper.bean;

import java.util.HashMap;
import java.util.Map;

import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public class Table {
	
	public static final String id="id";
	public static final String myId="myId";
	public static final String title="title";
	public static final String stuId="stuId";
	public static final String name="name";
	public static final String password="password";
	public static final String sex="sex";
	public static final String qq="qq";
	public static final String phone="phone";
	public static final String startTime="startTime";
	public static final String endTime="endTime";
	public static final String sendStart="sendStart";
	public static final String acceptStart="acceptStart";
	public static final String ImgUrl="ImgUrl";
	public static final String originPassword="originPassword";
	public static final String context="context";
	public static final String content="content";
	public static final String accepStuId="accepStuId";
	public static final String state="state";
	public static final String page="page";
	public static final String accepName="accepName";           //接单人姓名
	public static final String money="money";    //报酬
	public static final String starts="starts";
	public final static String CommentUserInf="CommenUserInf";
	public final static String headHeadImageName="headHeadImageName";//shareperence
	public final static String isLogin="isLogin";
	/**
	  * JSON解析 
	  * @param JSONString
	  * @return
	  */
    public  static Map<String, Object> parseJSONString(String JSONString) { 
    	Log.e("parseJSONString","parseJSONString");
       Map<String, Object> resultMap = new HashMap<String, Object>();  
       try {  
           JSONObject person = new JSONObject(JSONString);  
          // resultMap.put(Table.id, person.getString(Table.id));
           
           resultMap.put(Table.stuId, person.getString(Table.stuId));  
           Log.e("resultMap=",(String)resultMap.get(Table.stuId));
           resultMap.put(Table.name, person.getString(Table.name));  
           resultMap.put(Table.password, person.getString(Table.password));
           resultMap.put(Table.sex,person.getString(Table.sex));
           resultMap.put(Table.qq, person.getString(Table.qq));
           resultMap.put(Table.phone,person.getString(Table.phone));
           resultMap.put(Table.sendStart, person.getString(Table.sendStart));
           resultMap.put(Table.acceptStart, person.getString(Table.acceptStart));
           resultMap.put(Table.ImgUrl,person.getString(Table.ImgUrl));
           resultMap.put(Table.originPassword,person.getString(Table.originPassword));
           
       } catch (JSONException e) {  
           e.printStackTrace();  
       }  
       return resultMap;  
   }  

}
